package com.example.tally.frag_record;


import com.example.tally.R;
import com.example.tally.db.DBManager;
import com.example.tally.db.TypeBean;

import java.util.List;

/**
 * 记录页面的支出模块
 */
public class OutcomeFragment extends BaseRecordFragment {

    @Override
    public void loadDataToGridView(){
        super.loadDataToGridView();
        List<TypeBean> outList = DBManager.getTypeList(0);
        typeBeanList.addAll(outList);
        typeBeanAdater.notifyDataSetChanged();
        typeTv.setText("其他");
        typeIv.setImageResource(R.mipmap.ic_qita_fs);
    }

    @Override
    public void saveAccountToDb() {
        accountBean.setKind(0);
        DBManager.insertItemToAccounttb(accountBean);
    }

}